<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$meta_title}{$recycle}</h2>
    </div>
    <div class="clearfix">
        <div class="col-xs-10">
            <a class="btn btn-success" href="{:U('updateUnit',array('a_type'=>'add'))}">新增</a>
            <button class="btn ajax-post btn-primary" url="{:U('setStatus',array('method'=>'resume','model'=>'core_data'))}"
                    target-form="ids">激活
            </button>
            <button class="btn ajax-post btn-warning" url="{:U('setStatus',array('method'=>'forbid','model'=>'core_data'))}"
                    target-form="ids">禁用
            </button>
            <button class="btn ajax-post btn-danger" url="{:U('setStatus',array('method'=>'delete','model'=>'core_data'))}"
                    target-form="ids">删除
            </button>
            <a class="btn btn-success" href="{:U('daoru')}">导入</a>
        </div>
        <!-- 高级搜索 -->
        <div class="search-form  col-xs-2 text-right">
            <div class="input-group">
                <input type="text" name="keyword" class="search-input form-control" value="{:I('keyword')}" placeholder="标识">
                 <span class="input-group-btn">  <a class="btn btn-default" href="javascript:;" id="search" url="{:U('kdSign')}"><i class="icon-search"></i></a></span>
            </div>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table with-padding">
        <table class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                <th class="">达客标识</th>
                <th class="">创建时间</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="_list">
                <volist name="_list" id="vo">
                    <tr>
                        <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
                        <td>{$vo.dksign}</td>
                        <td>{$vo.create_time}</td>
                        
                    </tr>
                </volist>
                <else/>
                <td colspan="10" class="text-center">{:L('_ADMIN_USER_EMPTY_')}</td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="with-padding">
        {$_page}
    </div>
</block>

<block name="script">
    <script src="__CSS__/status.css"></script>
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    
    <script type="text/javascript">
        //搜索功能
        $("#search").click(function () {
            var url = $(this).attr('url');
            var query = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            if (url.indexOf('?') > 0) {
                url += '&' + query;
            } else {
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });
        //导航高亮
    </script>
</block>